\(\int \frac {1+2 x^2}{1+4 x^4} \, dx\) [47]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 21 \[ \int \frac {1+2 x^2}{1+4 x^4} \, dx=-\frac {1}{2} \arctan (1-2 x)+\frac {1}{2} \arctan (1+2 x) \]

[Out]

1/2*arctan(-1+2*x)+1/2*arctan(1+2*x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {1176, 631, 210} \[ \int \frac {1+2 x^2}{1+4 x^4} \, dx=\frac {1}{2} \arctan (2 x+1)-\frac {1}{2} \arctan (1-2 x) \]

[In]

Int[(1 + 2*x^2)/(1 + 4*x^4),x]

[Out]

-1/2*ArcTan[1 - 2*x] + ArcTan[1 + 2*x]/2

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 631

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[a*(c/b^2)]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b)], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1176

Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[2*(d/e), 2]}, Dist[e/(2*c), Int[1/S
imp[d/e + q*x + x^2, x], x], x] + Dist[e/(2*c), Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; FreeQ[{a, c, d, e},
 x] && EqQ[c*d^2 - a*e^2, 0] && PosQ[d*e]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{4} \int \frac {1}{\frac {1}{2}-x+x^2} \, dx+\frac {1}{4} \int \frac {1}{\frac {1}{2}+x+x^2} \, dx \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-2 x\right )-\frac {1}{2} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+2 x\right ) \\ & = -\frac {1}{2} \tan ^{-1}(1-2 x)+\frac {1}{2} \tan ^{-1}(1+2 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1+2 x^2}{1+4 x^4} \, dx=-\frac {1}{2} \arctan \left (\frac {2 x}{-1+2 x^2}\right ) \]

[In]

Integrate[(1 + 2*x^2)/(1 + 4*x^4),x]

[Out]

-1/2*ArcTan[(2*x)/(-1 + 2*x^2)]

Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.76

method result size
risch \(\frac {\arctan \left (x \right )}{2}+\frac {\arctan \left (2 x^{3}+x \right )}{2}\) \(16\)
default \(\frac {\arctan \left (2 x -1\right )}{2}+\frac {\arctan \left (1+2 x \right )}{2}\) \(18\)
parallelrisch \(-\frac {i \ln \left (x -\frac {1}{2}-\frac {i}{2}\right )}{4}+\frac {i \ln \left (x -\frac {1}{2}+\frac {i}{2}\right )}{4}-\frac {i \ln \left (x +\frac {1}{2}-\frac {i}{2}\right )}{4}+\frac {i \ln \left (x +\frac {1}{2}+\frac {i}{2}\right )}{4}\) \(38\)
meijerg \(\frac {\sqrt {2}\, \left (\frac {x^{3} \sqrt {2}\, \ln \left (1-2 \left (x^{4}\right )^{\frac {1}{4}}+2 \sqrt {x^{4}}\right )}{2 \left (x^{4}\right )^{\frac {3}{4}}}+\frac {x^{3} \sqrt {2}\, \arctan \left (\frac {\left (x^{4}\right )^{\frac {1}{4}}}{1-\left (x^{4}\right )^{\frac {1}{4}}}\right )}{\left (x^{4}\right )^{\frac {3}{4}}}-\frac {x^{3} \sqrt {2}\, \ln \left (1+2 \left (x^{4}\right )^{\frac {1}{4}}+2 \sqrt {x^{4}}\right )}{2 \left (x^{4}\right )^{\frac {3}{4}}}+\frac {x^{3} \sqrt {2}\, \arctan \left (\frac {\left (x^{4}\right )^{\frac {1}{4}}}{1+\left (x^{4}\right )^{\frac {1}{4}}}\right )}{\left (x^{4}\right )^{\frac {3}{4}}}\right )}{8}+\frac {\sqrt {2}\, \left (-\frac {x \sqrt {2}\, \ln \left (1-2 \left (x^{4}\right )^{\frac {1}{4}}+2 \sqrt {x^{4}}\right )}{2 \left (x^{4}\right )^{\frac {1}{4}}}+\frac {x \sqrt {2}\, \arctan \left (\frac {\left (x^{4}\right )^{\frac {1}{4}}}{1-\left (x^{4}\right )^{\frac {1}{4}}}\right )}{\left (x^{4}\right )^{\frac {1}{4}}}+\frac {x \sqrt {2}\, \ln \left (1+2 \left (x^{4}\right )^{\frac {1}{4}}+2 \sqrt {x^{4}}\right )}{2 \left (x^{4}\right )^{\frac {1}{4}}}+\frac {x \sqrt {2}\, \arctan \left (\frac {\left (x^{4}\right )^{\frac {1}{4}}}{1+\left (x^{4}\right )^{\frac {1}{4}}}\right )}{\left (x^{4}\right )^{\frac {1}{4}}}\right )}{8}\) \(242\)

[In]

int((2*x^2+1)/(4*x^4+1),x,method=_RETURNVERBOSE)

[Out]

1/2*arctan(x)+1/2*arctan(2*x^3+x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.71 \[ \int \frac {1+2 x^2}{1+4 x^4} \, dx=\frac {1}{2} \, \arctan \left (2 \, x^{3} + x\right ) + \frac {1}{2} \, \arctan \left (x\right ) \]

[In]

integrate((2*x^2+1)/(4*x^4+1),x, algorithm="fricas")

[Out]

1/2*arctan(2*x^3 + x) + 1/2*arctan(x)

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.67 \[ \int \frac {1+2 x^2}{1+4 x^4} \, dx=\frac {\operatorname {atan}{\left (x \right )}}{2} + \frac {\operatorname {atan}{\left (2 x^{3} + x \right )}}{2} \]

[In]

integrate((2*x**2+1)/(4*x**4+1),x)

[Out]

atan(x)/2 + atan(2*x**3 + x)/2

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1+2 x^2}{1+4 x^4} \, dx=\frac {1}{2} \, \arctan \left (2 \, x + 1\right ) + \frac {1}{2} \, \arctan \left (2 \, x - 1\right ) \]

[In]

integrate((2*x^2+1)/(4*x^4+1),x, algorithm="maxima")

[Out]

1/2*arctan(2*x + 1) + 1/2*arctan(2*x - 1)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (17) = 34\).

Time = 0.26 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.19 \[ \int \frac {1+2 x^2}{1+4 x^4} \, dx=\frac {1}{2} \, \arctan \left (2 \, \sqrt {2} \left (\frac {1}{4}\right )^{\frac {3}{4}} {\left (2 \, x + \sqrt {2} \left (\frac {1}{4}\right )^{\frac {1}{4}}\right )}\right ) + \frac {1}{2} \, \arctan \left (2 \, \sqrt {2} \left (\frac {1}{4}\right )^{\frac {3}{4}} {\left (2 \, x - \sqrt {2} \left (\frac {1}{4}\right )^{\frac {1}{4}}\right )}\right ) \]

[In]

integrate((2*x^2+1)/(4*x^4+1),x, algorithm="giac")

[Out]

1/2*arctan(2*sqrt(2)*(1/4)^(3/4)*(2*x + sqrt(2)*(1/4)^(1/4))) + 1/2*arctan(2*sqrt(2)*(1/4)^(3/4)*(2*x - sqrt(2
)*(1/4)^(1/4)))

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.71 \[ \int \frac {1+2 x^2}{1+4 x^4} \, dx=\frac {\mathrm {atan}\left (2\,x^3+x\right )}{2}+\frac {\mathrm {atan}\left (x\right )}{2} \]

[In]

int((2*x^2 + 1)/(4*x^4 + 1),x)

[Out]

atan(x + 2*x^3)/2 + atan(x)/2